<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <script th:src="@{/static/js/lin/jquery-1.3.1.js}"></script>
    <script type="text/javascript" th:src="@{/static/js/plugins/wangEditor.min.js}"></script>
    <script th:src="@{/static/js/lin/notice.js}"></script>
    <!-- Sweet alert -->
    <link href="../css/plugins/sweetalert/sweetalert.css" rel="stylesheet"/>
    <script src="../js/plugins/sweetalert/sweetalert.min.js"></script>
    <title>发送通知</title>

    <link rel="shortcut icon" href="static/favicon.ico"/>
    <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet"/>
    <link href="../css/font-awesome.css?v=4.4.0" rel="stylesheet"/>

    <!-- jqgrid-->
    <link href="../css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet"/>

    <link href="../css/animate.css" rel="stylesheet"/>
    <link href="../css/style.css?v=4.1.0" rel="stylesheet"/>
    <link rel="stylesheet" href="../static/plugin/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css"
          th:href="@{/static/css/lin/easyui.css}"/>
    <script th:src="@{/static/js/lin/jquery.min.js}"></script>
    <script th:src="@{/static/js/lin/jquery.easyui.min.js}"></script>
    <style>
        /* Additional style to fix warning dialog position */
        #alertmod_table_list_2 {
            top: 900px !important;
        }
    </style>


</head>

<body class="gray-bg">


<div id="loading" style="text-align: center;display: none">
    <img alt="alt" th:src="@{../img/loading.gif}"/>
</div>


<!-- 主体 -->

<br/>
<br/>


<div class="col-md-10">
    <form id="noticform" action="">
        <div class="layui-form-item">
            <label class="layui-form-label">消息类型：</label>
            <div class="layui-input-block">
                <input type="text" name="title" value="系统消息" lay-verify="required" placeholder="请输入标题"
                       autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">消息标题：</label>
            <div class="layui-input-block">
                <input type="text" name="title" th:value="${fileNotice.title}" class="form-control"/>
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-2  col-md-2 control-label">消息发布时间：</label>
            <div class="layui-input-block">
                <input type="text" name="title" th:value="${fileNotice.createtime}" class="form-control"/>
            </div>

        </div>

        <div class="form-group">
            <label class="col-sm-2  col-md-2 control-label">通知内容：</label>
            <div class="layui-input-block">
                <div id="content"></div>
            </div>

        </div>

        <div class="form-group">
            <label class="col-sm-5 col-md-5 control-label">下载附件：</label>
            <a class="col-sm-5 col-md-5"
               th:href="@{/files/download(filePath=${fileNotice.file.filePath},fileName=${fileNotice.file.fileName})}"
               th:text="${fileNotice.file.fileName}"></a>
        </div>

    </form>


</div>


<!-- 全局js -->

<script src="../js/bootstrap.min.js?v=3.3.6"></script>


<!-- Peity -->
<script src="../js/plugins/peity/jquery.peity.min.js"></script>

<script th:inline="javascript">
    $(function () {
        var E = window.wangEditor;
        var editor = new E('#content');
        editor.create();
        // 初始化 textarea 的值
        var content = [[${fileNotice.body}]];
//        $("#content").html(content);
        editor.txt.html(content)
    });

</script>


</body>

</html>
